package com.mihong.entity;

import java.io.Serializable;
import java.util.Map;

/**
 * 	数据帧 
 * @date: 2019年3月5日
 */
public class Frame implements Serializable{
	
	private static final long serialVersionUID = -2370547641761744475L;
	
	private final String head = "FEFE";
	private String version;		
	private String frameNo;
	private String address;
	private String command;
	private String length;
	private Map<String,Object> dataBody;
	private String crc;
	private final String frameEnd = "EEEE";
	
	
	public Frame() {
		
	}

	public Frame(String version, String frameNo, String address, String command, String length,
			Map<String, Object> dataBody, String crc) {
		super();
		this.version = version;
		this.frameNo = frameNo;
		this.address = address;
		this.command = command;
		this.length = length;
		this.dataBody = dataBody;
		this.crc = crc;
	}



	public String getVersion() {
		return version;
	}


	public void setVersion(String version) {
		this.version = version;
	}


	public String getFrameNo() {
		return frameNo;
	}


	public void setFrameNo(String frameNo) {
		this.frameNo = frameNo;
	}


	public String getAddress() {
		return address;
	}


	public void setAddress(String address) {
		this.address = address;
	}


	public String getCommand() {
		return command;
	}


	public void setCommand(String command) {
		this.command = command;
	}


	public String getLength() {
		return length;
	}


	public void setLength(String length) {
		this.length = length;
	}


	public Map<String, Object> getDataBody() {
		return dataBody;
	}


	public void setDataBody(Map<String, Object> dataBody) {
		this.dataBody = dataBody;
	}


	public String getCrc() {
		return crc;
	}


	public void setCrc(String crc) {
		this.crc = crc;
	}

	@Override
	public String toString() {
		return "Frame [head=" + head + ", version=" + version + ", frameNo=" + frameNo + ", address=" + address
				+ ", command=" + command + ", length=" + length + ", dataBody=" + dataBody + ", crc=" + crc
				+ ", frameEnd=" + frameEnd + "]";
	}
}
